dpkg --status bind9 &> /dev/null || <%= (@resolv[:object] == :container).inspect %>

cat <<EOF | tee /etc/resolv.conf
<%= ZTK::Template.do_not_edit_notice(:message => "TestLab Resolv Provisioner") %>
<% if !@resolv[:domain].nil? -%>
domain <%= @resolv[:domain] %>
<% end -%>
<% if !@resolv[:search].nil? -%>
search <%= @resolv[:search].flatten.compact.uniq.join(' ') %>
<% end -%>
<% if !@resolv[:servers].nil? -%>
<% @resolv[:servers].flatten.compact.uniq.each do |server| -%>
nameserver <%= server %>
<% end -%>
<% end -%>
EOF
